package com.new_blog.service.impl;

import com.new_blog.model.Articleinfo;
import com.new_blog.mapper.ArticleinfoMapper;
import com.new_blog.model.vo.ArticleInfoVo;
import com.new_blog.service.ArticleinfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author TQ02
 * @since 2024-03-21
 */
@Service
public class ArticleinfoServiceImpl extends ServiceImpl<ArticleinfoMapper, Articleinfo> implements ArticleinfoService {
    @Autowired
    private ArticleinfoMapper articleMapper;
    @Override
    public List<ArticleInfoVo> getAllPage(Integer pasize, Integer pindex) {
        return articleMapper.getAllPage(pasize,pindex);
    }

    @Override
    public Integer getCount() {
        return articleMapper.getCount();
    }

    @Override
    public Integer getCountId(String num) {
        return articleMapper.getCountId(num);
    }

    @Override
    public Integer getCountType(String num) {
        return articleMapper.getCountType(num);
    }
    @Override
    public Integer delete(int num) {
        return articleMapper.delete(num);
    }

    //查询指定讯号文章
    @Override
    public Articleinfo getId(Integer aid) {
        return articleMapper.getId(aid);
    }

    @Override
    public List<ArticleInfoVo> getSearchPage(int pasize, int offest, String text) {
        return articleMapper.getSearchPage(pasize,offest, text);
    }

    @Override
    public int getSearchCount(String text) {
        return articleMapper.getSearchCount(text);
    }
}
